
#include <iostream>
#include "fun.h"

int main()
{
    std::cout << "Test cuda Elemwise" << std::endl;
    {
    
    int size_x = 5;
    int size_y = 4;

    hs::raster::RasterData<float> mat_a(size_x, size_y);
    hs::raster::RasterData<float> mat_b(size_x, size_y);
    
    for (int i = 0; i < mat_a.view().numel(); ++i) {
        mat_a.view().pData()[i] = 2*i + 1;
        mat_b.view().pData()[i] = 2*i - 1;
    }

    std::cout << "mat a: " << std::endl;
    printmat(mat_a.view());

    std::cout << "mat b: " << std::endl;
    printmat(mat_b.view());

    hs::raster::RasterData<float> mat_c;
    hs::raster::RasterData<float> mat_d;

    testOddEven(mat_a, mat_b, mat_c, mat_d);

    std::cout << "mat c: " << std::endl;
    printmat(mat_c.view());

    std::cout << "mat d: " << std::endl;
    printmat(mat_d.view());

    }

    std::cout << "Done!" << std::endl;
    return 0;
}
